﻿// See https://aka.ms/new-console-template for more information
namespace StudyDemo.GenericParadigm;
public partial class GVector<T>
{
    #region 简单泛型
    //GVector<string> gStringVector = new GVector<string>("Hello", "World");
    //gStringVector.Print();
    //GVector<int> gIntVector = new GVector<int>(1, 2);
    //gIntVector.Print();
    #endregion

    public T X { get; set; }
    public T Y { get; set; }

    public GVector(T x, T y)
    {
        this.X = x;
        this.Y = y;
    }

    public void Print()
    {
        Console.WriteLine("X=" + X + "; Y=" + Y);
    }
     
}





